package cn.com.doone.common.uc.domain.rs;

import java.util.List;
import java.util.Map;

import cn.com.doone.common.uc.service.dto.UserGroup;
import cn.com.doone.common.uc.service.dto.UserGroupAppAuthorize;
import cn.com.doone.common.uc.service.dto.UserGroupMember;
import cn.com.doone.common.uc.service.dto.UserInfo;

public interface IRegisterJdbcRepository {
	
	public boolean validUsername(String userAccount);
	
	public boolean validPassword(String password);
	
	public int addUser(UserInfo userInfo);
	
	public void removeUser(String userAccount);
	
	public boolean validTenantCode(String tenantCode);
	
	public int addTenant(UserGroup userGroup);
	
	public void updateTenant(UserGroup userGroup);
	
	public void addUserGroupMember(UserGroupMember userGroupMember);
	
	public int findGroupIdByTenantCode(String tenantCode);
	
	public List<Map<String, Object>> findNotSyncUser();
	
	/**
	 * 更新同步时间
	 */
	public void updateSync();
	
	/**
	 * 重置密码
	 * 
	 * @param userAccount
	 * @param tenantFullName
	 * @return 
	 */
	public String resetPassword(String userAccount);
	
	/**
	 * 根据APP_CODE获取ID
	 * 
	 * @param appCode
	 * @return
	 */
	public int findAppInfoIdByAppCode(String appCode);
	
	/**
	 * 保存租户授权
	 * 
	 * @param userGroupAppAuthorize
	 */
	public void addGroupAppAuthorize(UserGroupAppAuthorize userGroupAppAuthorize);


}
